#define _CRT_SECURE_NO_WARNINGS 1

int findString(char** words, int wordsSize, char* s) {
    for (int i = 0; i < wordsSize; i++)
    {
        if (words[i][0] == s[0])
        {
            for (int j = 1; ; j++)
            {
                if (words[i][j] == s[j] && s[j] == '\0')
                    return i;
                if (words[i][j] != s[j])
                    break;
            }
        }
    }

    return -1;
}